import instance from '@/utils/request'

export function companyDepartmentRequest() {
  return instance({
    url: '/api/company/department',
    method: 'get'
  })
}
export function getUserSimpleRequest() {
  return instance({
    url: '/api/sys/user/simple',
    method: 'get'
  })
}
export function addDepartmentRequest(data) {
  return instance({
    url: '/api/company/department',
    method: 'post',
    data
  })
}
export function deleteDepartmentRequest(id) {
  return instance({
    method: 'DELETE',
    url: `/api/company/department/${id}`
  })
}
export function updateDepartmentRequest(data) {
  return instance({
    method: 'put',
    url: `/api/company/department/${data.id}`,
    data
  })
}

export function getDepartmentDetailRequest(id) {
  return instance({
    method: 'get',
    url: `/api/company/department/${id}`
  })
}
